//
//  CHTCollectionViewWaterfallFooter.m
//  Demo
//
//  Created by Neil Kimmett on 28/10/2013.
//  Copyright (c) 2013 Nelson. All rights reserved.
//

#import "WaterfallFooter.h"

@implementation WaterfallFooter

- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self drawView];
        
        
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(noMoreDataEvent)name:@"NoMoreDataEvent" object:nil];
        
    }
    return self;
}


- (void) drawView
{
    
    mIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    mIndicator.hidesWhenStopped = YES;
    mIndicator.frame = CGRectMake(MAIN_SCREEN_WIDTH/2-10, 10, 20, 20);
    [mIndicator startAnimating];
    [self addSubview:mIndicator];
    
    
}

- (void) noMoreDataEvent {
    //self.backgroundColor = [UIColor greenColor];

}

@end
